void main(){
  //闭包-与JS语法一致
  var cc=getCounter();
  print(cc());
  print(cc());
  print(cc());
}

Function getCounter(){
  var count=1;
  int counter(){
    return count++;
  }
  return counter;
}